<template>
  <a-config-provider :locale="zhCN">
    <div :data-theme="theme">
      <router-view />
    </div>
  </a-config-provider>
</template>

<script setup>
import { computed } from 'vue'
import { useAppStore } from './stores/app'
import zhCN from 'ant-design-vue/es/locale/zh_CN'

const appStore = useAppStore()

// 主题相关
const theme = computed(() => appStore.theme)
</script>

<style scoped>
/* 主题相关样式 */
[data-theme='dark'] {
  background-color: var(--background-color-dark);
  color: var(--text-color-dark);
}
</style>
